package com.new_wear.project.system.enforcement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.new_wear.project.system.enforcement.mapper.EnforcementMapper;
import com.new_wear.project.system.enforcement.domain.Enforcement;
import com.new_wear.project.system.enforcement.service.IEnforcementService;
import com.new_wear.common.utils.text.Convert;

/**
 * 执法人员信息Service业务层处理
 * 
 * @author new_wear
 * @date 2019-12-23
 */
@Service
public class EnforcementServiceImpl implements IEnforcementService 
{
    @Autowired
    private EnforcementMapper enforcementMapper;

    /**
     * 查询执法人员信息
     * 
     * @param id 执法人员信息ID
     * @return 执法人员信息
     */
    @Override
    public Enforcement selectEnforcementById(Long id)
    {
        return enforcementMapper.selectEnforcementById(id);
    }

    /**
     * 查询执法人员信息列表
     * 
     * @param enforcement 执法人员信息
     * @return 执法人员信息
     */
    @Override
    public List<Enforcement> selectEnforcementList(Enforcement enforcement)
    {
        return enforcementMapper.selectEnforcementList(enforcement);
    }

    /**
     * 新增执法人员信息
     * 
     * @param enforcement 执法人员信息
     * @return 结果
     */
    @Override
    public int insertEnforcement(Enforcement enforcement)
    {
        return enforcementMapper.insertEnforcement(enforcement);
    }

    /**
     * 修改执法人员信息
     * 
     * @param enforcement 执法人员信息
     * @return 结果
     */
    @Override
    public int updateEnforcement(Enforcement enforcement)
    {
        return enforcementMapper.updateEnforcement(enforcement);
    }

    /**
     * 删除执法人员信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEnforcementByIds(String ids)
    {
        return enforcementMapper.deleteEnforcementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除执法人员信息信息
     * 
     * @param id 执法人员信息ID
     * @return 结果
     */
    @Override
    public int deleteEnforcementById(Long id)
    {
        return enforcementMapper.deleteEnforcementById(id);
    }
}
